package com.szlanyou.lylog.tool;

import android.content.Context;

import java.io.File;

public class LyAppTool {
    public static boolean isLogFileExist(File file) {
        return file != null && file.exists();
    }

    public static File getLogFileDir(Context context) {
        File cacheFile = context.getFilesDir();
        if (cacheFile != null) {
            String subDir = "encryLog" + File.separator;
            cacheFile = new File(cacheFile, subDir);
            if (!cacheFile.exists() || !cacheFile.isDirectory()) {
                cacheFile.mkdirs();
            }
        }
        return cacheFile;
    }


}
